// ==UserScript==
// @name         JS学习
// @namespace    http://tampermonkey.net/
// @version      0.1.20220516
// @description  仅用于学习使用，网课自动挂机看视频，网课作业自动做题共享答案。网课在线辅助脚本❤网课辅助题库❤全自动化操作挂机【易全题库】
// @author       YanMing
// @match        *://www.baidu.com/*
// @match        *://*.uooconline.com/*
// @icon         
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function allow_platform(){
        // 判断当前是哪个平台
        var platform ='';
        var thatHost = document.location.host;
        if(thatHost){
            var hostArr=thatHost.split(".");
            if(hostArr && hostArr.length>0){
                platform = hostArr[hostArr.length-2] ;
            }
        }

        var platformInfo = {
            baidu: { name: "baidu联盟", match: "*://*.baidu.com/*" },
            uooconline: { name: "UOOC优课联盟", match: "*://*.uooconline.com/*" },
        };
        if(platform){
            var thatPlatform=platformInfo[platform];
            if(thatPlatform){
                console.log("当前正在使用"+thatPlatform.name+"！")
                switch(SETTING.platform) {
                    case "uooconline":
                        uooc_start();
                        break;
                    default:
                        console.warn(thatPlatform.name+"，暂未实现！")
                }
            }else{
                console.warn("当前暂不支持"+platform+"平台！")
            }
        }
    }


})();

